package com.bw.zg3park2212.signlist

import androidx.lifecycle.MutableLiveData
import com.bw.base.entity.SiginEntity
import com.bw.base.entity.SiginEntityItem
import com.bw.base.entity.SiginParam
import com.bw.base.mvvm.BaseViewModel
import com.bw.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class SiginViewModel @Inject constructor(val apiServise: ApiService): BaseViewModel() {
    val siginlistSuccse=MutableLiveData<SiginEntity>()
    fun getsiginlist(userId:Int){
        httpRequst(
            {apiServise.getSiginList(userId)},
            siginlistSuccse::postValue
        )
    }
    val siginDakaSuccse=MutableLiveData<SiginEntityItem>()
    fun getsigindaka(siginParam: SiginParam){
        httpRequst(
            {apiServise.getSiginDaka(siginParam)},
            siginDakaSuccse::postValue
        )
    }
}